Skip to content

Update pre-build recipe #965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2020
Merged

Update pre-build recipe #965

merged 1 commit into from
Mar 4, 2020

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Mar 3, 2020

Create prebuild.sh script to perform all required actions.
Same script for all supported host OS.
Fixes #957 when path contains space.

Edit: should also fixes #359

@fpistm fpistm added enhancement New feature or request fix 🩹 Bug fix labels Mar 3, 2020
@fpistm fpistm added this to the 1.9.0 milestone Mar 3, 2020
@fpistm
Copy link
Member Author

fpistm commented Mar 3, 2020

Tested on Linux, Mac and Windows with space in Arduino IDE folder path, Sketch path and build output path. Tested also with VSCode. PIO is not impacted as the prebuild is not executed.

@JAndrassy
Copy link

JAndrassy commented Mar 3, 2020

I recommend to put the script in system. it is an 'official' folder mapped to {build.system.path}.
'extras' folder could make problems for hardware definitions referencing this package.
I don't know yet if this core works as referenced according to Arduino hw package specs, but the 'extras' folder would definitely not work.

@fpistm
Copy link
Member Author

fpistm commented Mar 3, 2020

Thansk @JAndrassy
That make sense.

@fpistm
Copy link
Member Author

fpistm commented Mar 3, 2020

@JAndrassy

Refering to https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification:

Global Predefined properties

The Arduino IDE sets the following properties that can be used globally in all configurations files:

{runtime.platform.path}     - the absolute path of the platform folder (i.e. the folder containing boards.txt)

and:

Moreover the IDE automatically provides the following properties:

{build.system.path}       - The path to the selected platform's system folder if available (for example hardware/arduino/sam/system)

So I wonder if this will change anything as {runtime.platform.path} is also an 'official' folder.

so updating to:

- extras.path={runtime.platform.path}/extras
+ extras.path={build.system.path}/extras

will not change the behavior.

@JAndrassy
Copy link

JAndrassy commented Mar 3, 2020

{runtime.platform.path}, points to the folder of selected board's boards.txt file. In case of a referring definition it is not the right folder to access sdk and tools. {build.system.path} is right for this.

a core can be referred by other core or by a custom hardware definition.
here I have my customized definitions for avr and samd. they refer the official avr and samd cores.
https://github.com/jandrassy/my_boards

EDIT 2020-03-05: I added BluePill to my_boards

@fpistm
Copy link
Member Author

fpistm commented Mar 3, 2020

OK. I don't think about this use case.
Thanks for pointing out this.

Create prebuild.sh script to perform all required actions.
Same script for all supported host OS.
Fixes stm32duino#957 when path contains space.

Signed-off-by: Frederic Pillon <[email protected]>
@matthijskooijman
Copy link
Contributor

{runtime.platform.path}, points to the folder of selected board's boards.txt file. In case of a referring definition it is not the right folder to access sdk and tools. {build.system.path} is right for this.

See arduino-cli code (used by current arduino-builder) for how this is implemented.

I've also updated https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification to clarify how this works.

@fpistm fpistm merged commit 5f56881 into stm32duino:master Mar 4, 2020
@fpistm fpistm deleted the prebuild branch March 4, 2020 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix 🩹 Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing quotes around {build.path} in platform.txt Compilation Error
3 participants